Optimal. Leaf size=118 \[ \frac{2 A \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{a d}-\frac{2 \left (A b^2-a (b B-a C)\right ) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a b d (a+b)}-\frac{2 C E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{b d}+\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.599909, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.163, Rules used = {4112, 3055, 3059, 2639, 3002, 2641, 2805} \[ -\frac{2 \left (A b^2-a (b B-a C)\right ) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a b d (a+b)}+\frac{2 A F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d}-\frac{2 C E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{b d}+\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4112
Rule 3055
Rule 3059
Rule 2639
Rule 3002
Rule 2641
Rule 2805
Rubi steps
\begin{align*} \int \frac{A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt{\cos (c+d x)} (a+b \sec (c+d x))} \, dx &=\int \frac{C+B \cos (c+d x)+A \cos ^2(c+d x)}{\cos ^{\frac{3}{2}}(c+d x) (b+a \cos (c+d x))} \, dx\\ &=\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}}+\frac{2 \int \frac{\frac{1}{2} (b B-a C)+\frac{1}{2} b (A-C) \cos (c+d x)-\frac{1}{2} a C \cos ^2(c+d x)}{\sqrt{\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{b}\\ &=\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}}-\frac{2 \int \frac{-\frac{1}{2} a (b B-a C)-\frac{1}{2} a A b \cos (c+d x)}{\sqrt{\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a b}-\frac{C \int \sqrt{\cos (c+d x)} \, dx}{b}\\ &=-\frac{2 C E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{b d}+\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}}+\frac{A \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx}{a}+\left (-\frac{A b}{a}+B-\frac{a C}{b}\right ) \int \frac{1}{\sqrt{\cos (c+d x)} (b+a \cos (c+d x))} \, dx\\ &=-\frac{2 C E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{b d}+\frac{2 A F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d}-\frac{2 \left (\frac{A b}{a}-B+\frac{a C}{b}\right ) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{(a+b) d}+\frac{2 C \sin (c+d x)}{b d \sqrt{\cos (c+d x)}}\\ \end{align*}
Mathematica [A] time = 2.79748, size = 206, normalized size = 1.75 \[ \frac{\frac{C \sin (c+d x) \left (-2 b (a+b) \text{EllipticF}\left (\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right ),-1\right )+\left (a^2-2 b^2\right ) \Pi \left (-\frac{a}{b};\left .-\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right )\right |-1\right )+2 a b E\left (\left .\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right )\right |-1\right )\right )}{a b \sqrt{\sin ^2(c+d x)}}+\frac{b (A-C) \left (2 \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )-\frac{2 b \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a+b}\right )}{a}+\frac{(2 b B-3 a C) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a+b}+\frac{2 C \sin (c+d x)}{\sqrt{\cos (c+d x)}}}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 5.244, size = 409, normalized size = 3.5 \begin{align*} -{\frac{1}{d}\sqrt{- \left ( -2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}} \left ( 2\,{\frac{A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{-2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) }{a\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}}}-2\,{\frac{ \left ( -A{b}^{2}+Bab-{a}^{2}C \right ) \sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{-2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1}}{b \left ({a}^{2}-ab \right ) \sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}}{\it EllipticPi} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,2\,{\frac{a}{a-b}},\sqrt{2} \right ) }+2\,{\frac{C \left ( -\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +2\,\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \right ) }{b \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \left ( 2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) }} \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}{\frac{1}{\sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{A + B \sec{\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\left (a + b \sec{\left (c + d x \right )}\right ) \sqrt{\cos{\left (c + d x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt{\cos \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]